#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->calendarWidget->setFirstDayOfWeek(Qt::DayOfWeek::Sunday);

    ui->calendarWidget->setGridVisible(true);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_calendarWidget_selectionChanged()
{
    QDate date = ui->calendarWidget->selectedDate();

    ui->label->setText(date.toString());
}
